package com.xt.purchasingsystem.mapper;

import com.xt.purchasingsystem.model.MProcedureModuling;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MProcedureModulingMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(MProcedureModuling record);

    /**
     * 根据生产工序过程记录编号查询此工序过程所用的所有物料明细
     * @param mProceduringId
     * @return
     */
    List<MProcedureModuling> getAllByMproceduringId(Integer mProceduringId);

    int insertSelective(MProcedureModuling record);

    MProcedureModuling selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(MProcedureModuling record);

    int updateByPrimaryKey(MProcedureModuling record);

    /**
     * 根据Id修改物料数量和物料成本小计
     * @param id
     * @return
     */
    int updateAmountAndSubtotal(@Param("id") Integer id, @Param("amount") Double amount, @Param("subtotal") Double subtotal);
}